<script>
$(document).ready(function(){
	$(document).tooltip({
		selector: "[data-toggle='tooltip']"
	});
});
</script>
<br/>
<div class="wrapper clearfix">
	<?php $this->load->view('com_search/col_left.php');?> 
	<div class="primary">
		<header class="top_pr clearfix">
		<h3 class="title_primary">10+ tìm được <span><?php echo $tong; ?></span> gia sư <?php if(!empty($categories)){ ?> dạy môn <span><?php echo $categories->title; ?></span><?php }?></h3>
		<div class="left">
			<label>
			<select name="ajax_box1" class="box1_select guidulieu_ajax">
				<option value="5" <?php if($this->session->userdata('order')==5){echo ' selected="selected" ';}?> >-- Phân loại --</option>
				<option value="1" <?php if($this->session->userdata('order')==1){echo ' selected="selected" ';}?> >-- Giá giảm dần --</option>
				<option value="2" <?php if($this->session->userdata('order')==2){echo ' selected="selected" ';}?> >-- Giá tăng dần --</option>
				<option value="3" <?php if($this->session->userdata('order')==3){echo ' selected="selected" ';}?> >-- Tuổi giảm dần --</option>
				<option value="4" <?php if($this->session->userdata('order')==4){echo ' selected="selected" ';}?> >-- Tuổi tăng dần --</option>
			</select>
			</label>
		</div>
		</header>
		<article id="main_primary">
		<?php if(!empty($ketqua))  {
                    foreach ( $ketqua as $tt ) : 
					$data['tt'] = $tt;
                    $ava = explode(',',$tt->avartar); ?>
		<div class="profile row-fluid">
			<div class="well span12 profile-well">
				<div class="tutor_photo profile_photo">
					<a href="<?php echo base_url().'thong-tin-gia-su.'.$tt->id.'.html'; ?>" class="profile_photo_wrapper"><img class="profile_photo_wrapper" src="<?php echo get_thumnails($ava[0],108,141); ?>" alt="<?php echo $tt->name; ?>"> </a>
				</div>
				<div class="tutor_middle">
					<div class="tutor_name">
						<h1>
						<a href="<?php echo base_url().'thong-tin-gia-su.'.$tt->id.'.html'; ?>"><?php echo $tt->name; ?></a>
						</h1>
					</div>
					<div style="padding-top:10px">
						<p class="subjects">
						<?php echo $tt->profile_tit; ?>
						</p>
					</div>
					<div class="tutor_courses row-fluid" style="padding-top:10px">
						<span><?php echo character_limiter($tt->description1,430); ?></span>
					</div>
					<div class="tutor_courses tutor_certifications hidden-phone row-fluid">
						<?php $this->load->view('com_tutors/views_thanhtich.php', $data);?> 
					</div>
				</div>
				<div class="tutor_rate center">
					<h1 class="tutor_rating"><?php echo number_format($tt->mucluong); ?> VNĐ / Buổi</h1>
					<ul class="rateting">
						<span class="comment"><i class="icon-comment icon-2x"></i></span><a style="margin-left:35px; text-decoration:none;" href="<?php echo base_url().'thong-tin-gia-su.'.$tt->id.'/binh-luan.html'; ?>" title=""><?php  echo $this->common_model->getnumber2('rating_des',array('tutorid'=>$tt->id));?> Đánh giá</a>
					</ul>
					<span style="width:100px;" class="rating_details" data-number="5">
					<i class="icon-star"></i>
					<i class="icon-star"></i>
					<i class="icon-star"></i>
					<i class="icon-star"></i>
					<i class="icon-star"></i>
					</span>
					<a style="width:100%;margin:0 auto;text-decoration:none" title="Bấm để xem đánh giá" href="<?php echo base_url().'thong-tin-gia-su.'.$tt->id.'/danh-gia.html'; ?>"><span style="float:right;"><?php  echo $this->common_model->getnumber2('rating_star',array('tutorid'=>$tt->id));?> Sao</span></a>
					<div class="contact_container row-fluid">
						<a href="<?php echo base_url().'thong-tin-gia-su.'.$tt->id.'/email.html'; ?>" data-toggle="modal" class="btn1 btn-success msg_button_mustlogin" style="width:80%;font-size:13px;margin-top:5px;background:#7DB520;color:#fff"><i class="icon-envelope icon-white"></i> Gửi email</a>
						<a href="<?php echo base_url().'thong-tin-gia-su.'.$tt->id.'.html'; ?>" class="btn1 prof_button" style="width:80%;font-size:13px;margin-top:5px;background:#7DB520;color:#fff"><i class="icon-user"></i> Xem thông tin</a>
					</div>
				</div>
			</div>
		</div>
		<?php endforeach; } else { echo '<p style="font-size:18px">
		Hiện tại chưa có giáo viên nào !
	</p>
	';} ?> <footer id="footer_pri">
	<a href="#" class="btn_top">Đầu trang</a>
	<div class="page_navi">
		<?php echo $this->pagination->create_links();?>
	</div>
	</footer>
	</article>
</div>
</div>